package lambda;

import java.io.File;
import java.io.FileFilter;

public class LambdaDemo1 {
    public static void main(String[] args) {
        FileFilter filter=new FileFilter() {
            public boolean accept(File file) {
                return file.getName().contains("F");
            }
        };
        FileFilter filter1=(File file) ->{
            return file.getName().contains("F");
        };

        FileFilter filter2=(file)->{
            return file.getName().contains("F");
        };

        FileFilter filter3=(file)->file.getName().contains("F");

        FileFilter filter4=f->f.getName().contains("F");

        File dir=new File("./src/lambda");
        File[] subs=dir.listFiles(f->f.getName().contains("L"));
    }
}
